//package org.ricks.net.kcp;
//
//import org.ricks.common.utils.ThreadUtils;
//import org.ricks.net.transport.kcp.KcpSession;
//import org.ricks.protocol.ByteBuf;
//import proto.common.*;
//
//import java.util.List;
//
//public class RobotRoleAction {
//
//    private static List<Integer> roleIds = List.of(101001,101002,101003,101004,101005, 102001,102002,102003,102004,102005, 103001,103002,103003,103004,103005, 104001,104002,102003,104004,104005,
//            201001,201002,201003,201004,201005, 202001,202002,202003,202004,202005, 203001,203002,203003,203004,203005, 204001,204002,202003,204004,204005);
//
//
//    public static void starRoleAction(KcpSession session) {
//
//        RobotAction.addItem(session, 101001, 1);
//
//        ThreadUtils.sleep(1000L);
//
////        RobotAction.addItem(session, 1000, 100000000);
////        RobotAction.addItem(session, 1001, 100000000);
////        RobotAction.addItem(session, 1002, 100000000);
////        RobotAction.addItem(session, 1003, 100000000);
////        RobotAction.addItem(session, 1010, 100000000);
////        RobotAction.addItem(session, 1011, 100000000);
////        RobotAction.addItem(session, 1012, 100000000);
////        RobotAction.addItem(session, 1013, 100000000);
////        RobotAction.addItem(session, 1020, 100000000);
////        RobotAction.addItem(session, 1021, 100000000);
////        RobotAction.addItem(session, 1022, 100000000);
////        RobotAction.addItem(session, 1023, 100000000);
////        RobotAction.addItem(session, 1030, 100000000);
////        RobotAction.addItem(session, 1031, 100000000);
////        RobotAction.addItem(session, 1032, 100000000);
////        RobotAction.addItem(session, 1033, 100000000);
////        RobotAction.addItem(session, 101, 960000000);
//
//        initRoleStarLvItems(session);
//        for (int i = 0; i < 100 ; i++) {
//            roleStarLvAction(session, 101001);
//
//        }
//
//    }
//
//    public static void roleLvUpAction(KcpSession session, int cardId) {
//        RobotAction.addItem(session, 190, 1);
//        RobotAction.addItem(session, 191, 1);
//        RobotAction.addItem(session, 192, 1);
//        ThreadUtils.sleep(1000L);
//
//        PBCharacter pbCharacter = PBCharacter.newBuilder()
//                .setCharId(cardId)
//                .build();
//        PBItem pbItem1 = PBItem.newBuilder()
//                .setItemId(190)
//                .setNum(1)
//                .build();
//        PBItem pbItem2 = PBItem.newBuilder()
//                .setItemId(191)
//                .setNum(1)
//                .build();
//        PBItem pbItem3 = PBItem.newBuilder()
//                .setItemId(192)
//                .setNum(1)
//                .build();
//        PBItemPack pbItemPack = PBItemPack.newBuilder()
//                .addItemArray(pbItem1)
//                .addItemArray(pbItem2)
//                .addItemArray(pbItem3)
//                .build();
//
//        PBPlayer pbPlayer = PBPlayer.newBuilder()
//                .addCharacters(pbCharacter)
//                .setItemPack(pbItemPack)
//                .build();
//        FProto fProto = FProto.newBuilder()
//                .setKey(FProto.Key.Player)
//                .setAction(FProto.Action.CharacterUpgrade)
//                .setSelf(pbPlayer)
//                .build();
//
//        byte[] data = fProto.toByteArray();
//
//        ByteBuf buf = new ByteBuf(1024);
//        buf.writeByte((byte) 0x03);
//        buf.writeBytes(data);
//
//        session.send(buf.toArray());
//    }
//
//    /**
//     * 角色突破
//     */
//    public static void roleStarLvAction(KcpSession session, int cardId) {
//        ThreadUtils.sleep(2000L);
//
//
//        PBCharacter pbCharacter = PBCharacter.newBuilder()
//                .setCharId(cardId)
//                .build();
//
//        PBPlayer pbPlayer = PBPlayer.newBuilder()
//                .addCharacters(pbCharacter)
//                .build();
//        FProto fProto = FProto.newBuilder()
//                .setKey(FProto.Key.Player)
//                .setAction(FProto.Action.CharacterStarUp)
//                .setSelf(pbPlayer)
//                .build();
//
//        byte[] data = fProto.toByteArray();
//
//        ByteBuf buf = new ByteBuf(1024);
//        buf.writeByte((byte) 0x03);
//        buf.writeBytes(data);
//
//        session.send(buf.toArray());
//
//    }
//
//    public static void initRoleStarLvItems(KcpSession session) {
//        RobotAction.addItem(session, 31101,5);
//        RobotAction.addItem(session, 31102,5);
//        RobotAction.addItem(session, 31103,5);
//        RobotAction.addItem(session, 31104,5);
//        RobotAction.addItem(session, 31105,5);
//        RobotAction.addItem(session, 31201,5);
//        RobotAction.addItem(session, 31202,5);
//        RobotAction.addItem(session, 31203,5);
//        RobotAction.addItem(session, 31204,5);
//        RobotAction.addItem(session, 31205,5);
//
//        RobotAction.addItem(session, 31301,5);
//        RobotAction.addItem(session, 31302,5);
//        RobotAction.addItem(session, 31303,5);
//        RobotAction.addItem(session, 31304,5);
//        RobotAction.addItem(session, 31305,5);
//        RobotAction.addItem(session, 31401,5);
//        RobotAction.addItem(session, 31402,5);
//        RobotAction.addItem(session, 31403,5);
//        RobotAction.addItem(session, 31404,5);
//        RobotAction.addItem(session, 31405,5);
//
//        RobotAction.addItem(session, 32101,10);
//        RobotAction.addItem(session, 32102,10);
//        RobotAction.addItem(session, 32103,10);
//        RobotAction.addItem(session, 32104,10);
//        RobotAction.addItem(session, 32105,10);
//
//        RobotAction.addItem(session, 33101,5);
//        RobotAction.addItem(session, 33102,5);
//        RobotAction.addItem(session, 33103,5);
//        RobotAction.addItem(session, 33104,5);
//        RobotAction.addItem(session, 33105,5);
//        RobotAction.addItem(session, 33201,5);
//        RobotAction.addItem(session, 33202,5);
//        RobotAction.addItem(session, 33203,5);
//        RobotAction.addItem(session, 33204,5);
//        RobotAction.addItem(session, 33205,5);
//
//        RobotAction.addItem(session, 34101,5);
//        RobotAction.addItem(session, 34102,5);
//        RobotAction.addItem(session, 34103,5);
//        RobotAction.addItem(session, 34104,5);
//        RobotAction.addItem(session, 34105,5);
//        RobotAction.addItem(session, 34201,5);
//        RobotAction.addItem(session, 34202,5);
//        RobotAction.addItem(session, 34203,5);
//        RobotAction.addItem(session, 34204,5);
//        RobotAction.addItem(session, 34205,5);
//        RobotAction.addItem(session, 34301,5);
//        RobotAction.addItem(session, 34302,5);
//        RobotAction.addItem(session, 34303,5);
//        RobotAction.addItem(session, 34304,5);
//        RobotAction.addItem(session, 34305,5);
//    }
//}
